package cn.mugutu.webrtc.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.mugutu.webrtc.websocket.domain.SessionVo;
import cn.mugutu.webrtc.websocket.util.WebSocketUtil;

/**
 * webrtc 交互controller
 * @author gan
 *
 */

@Controller
@RequestMapping("/rtc")
@SuppressWarnings("all")
public class MessageController {
	
	//app用户
	@RequestMapping("/user")
	public String rtcUser(){
		return "demo/user";
	}
	
	//控制中心
	@RequestMapping("/police")
	public String rtcOffice(){
		return "demo/police";
	}
	
	/**
	 * 进入登陆页面
	 * @return
	 */
	@RequestMapping("/loginUI")
	public String loginUI(){
		return "/loginUI";
	}
	
	/**
	 * 验证登陆,进行跳转
	 * @return
	 */
	@RequestMapping("/login")
	public String login(String roomNumber,HttpSession session){
		System.out.println("roomNuber====>"+roomNumber);
		session.setAttribute("roomNumber",roomNumber);
		return "redirect:/rtc/chart";
	}

	@RequestMapping("/chart")
	public String chart(){
		return "chart";
	}
}
